<?php
/* 
* [***********************]
* @author: mazhenyu[houdunwangmzy@163.com]
* @Date:   2014-06-23 16:04:01
* @Last Modified time: 2014-06-25 17:15:28
*/
class ValidateUserControl extends Control{

	public function __init(){
		if(!isset($_SESSION[md5('index')]['uid'])){
			session('url','http://'.$_SERVER['SERVER_NAME'].$_SERVER['PHP_SELF']);
			$this->error('请先登陆','Index/Logo/index');
		}
		if(!defined('__TEMPLATE__')){
			define('__TEMPLATE__', __ROOT__ . '/Template/' .C('index_tpl_style'));
		}
		//获得分类数据
    	$menu = K('Category')->get_all(null,'is_show=1');
    	$this->assign('menu',$menu);
		
	}

	protected function dis($tpl){
		
		 $this->display(ROOT_PATH . 'Template/'.C('index_tpl_style'). '/' . $tpl);
	}

}
?>
